.TH std::complex::operator+(unary),operator-(unary) 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::complex::operator+(unary),operator-(unary) \- std::complex::operator+(unary),operator-(unary)

.SH Synopsis
   template< class T >
   std::complex<T> operator+( const                         \fI(until C++20)\fP
   std::complex<T>& val );
   template< class T >
   constexpr std::complex<T> operator+( const               \fI(since C++20)\fP
   std::complex<T>& val );                          \fB(1)\fP
   template< class T >
   std::complex<T> operator-( const                                       \fI(until C++20)\fP
   std::complex<T>& val );                              \fB(2)\fP
   template< class T >
   constexpr std::complex<T> operator-( const                             \fI(since C++20)\fP
   std::complex<T>& val );

   Implements the analogs of the unary arithmetic operators for complex numbers.

   1) Returns the value of its argument
   2) Negates the argument

.SH Parameters

   val - the complex number argument

.SH Return value

   1) a copy of the argument, std::complex<T>(val)
   2) negated argument, std::complex<T>(-val.real(), -val.imag())

.SH See also

   operator+ performs complex number arithmetic on two complex values or a complex and
   operator- a scalar
   operator* \fI(function template)\fP
   operator/
